<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%   
String path = request.getContextPath();   
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";   
%> 
<!DOCTYPE html>
<html>
<head>
    <title>最新动态</title>
    <base href="<%=basePath%>"> 
    <link rel="shortcut icon" href="<%=basePath%>img/favo.ico">
    <link href="css/bootstrap.css" rel="stylesheet">
    <link href="css/todc-bootstrap.css" rel="stylesheet">
    <link href="css/global.css" rel="stylesheet">
    <link href="css/layout.css" rel="stylesheet">
    <link href="css/user.css" rel="stylesheet">
    <link href="css/main.css" rel="stylesheet">
    <script type="text/javascript" src="js/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="js/bootstrap.js"></script>
    <script type="text/javascript" src="js/common.js"></script>
    <script type="text/javascript" src="js/attension.js"></script>

</head>

<body>
<jsp:include page="include/topbar.jsp"></jsp:include>
<jsp:include page="include/logobar.jsp"></jsp:include>
<div class="layout grid-s5m0">
	<div class="col-sub user-nav">
		<jsp:include page="include/usernav_c.jsp"></jsp:include>
	</div>
	<div class="main-wrap">
		<div class="box user-bd">
			<div class="tl" style="height:auto;">
				<h3 style="margin-top:30px;">
					简介:<span class="saved"><font>${user.profile}<c:if test='${user.profile==null or user.profile==""}'>这家伙很懒，什么也没留下...</c:if></font></span>
				</h3>
				<h3>
					<span class="saved"><font>职业:&nbsp;${user.profession }<c:if test="${user.profession==null or user.profession=='' }">游民</c:if></font>&nbsp;&nbsp;&nbsp;主页:&nbsp;
					<c:choose>
						<c:when test="${user.privateUrl==null or  user.privateUrl==''}">
							<a href="<%=com.constant.ParamUtil.domain %>c/home/${user.id }.html"><%=com.constant.ParamUtil.domain %>c/home/${user.id }.html</a>
						</c:when>
						<c:otherwise>
							<a href="<%=com.constant.ParamUtil.domain %>${user.privateUrl }.html"><%=com.constant.ParamUtil.domain %>${user.privateUrl }.html</a>
						</c:otherwise>
					</c:choose>
					</span>
				</h3>
				<h3>
					<span class="saved"><font>答案:&nbsp;</font></span>${user.answersNum+0 }&nbsp;
					<span class="saved"><font>短文:&nbsp;</font></span>${user.articleNum+0 }&nbsp;
				</h3>
			</div>
			<div style="clear:both"></div>
			<div class="bd">
				<div class="tagsinput">
					<span id="taglist">
						<c:forEach var="tag" items="${tags }">
							<span class="badge tag">&nbsp;${tag.name }&nbsp;</span>
		                </c:forEach>
	                </span>
                </div>
                <div class="timeline" id="timeline">
                	<div class="event box">
                		<div class="hd tl">
                			<h3>
                			关注他/她的<span class="saved">[&nbsp;共${fans.allRow }人&nbsp;]</span>
                			</h3>
                		</div>
                		<div class="bd">
                		<ol class="unstyled inline userlist">
	                	<c:forEach var='map' items='${fans.list }'>
		                	<li>
		                		<div class="box img-polaroid">
		                			<div class="img">
				                		<p>
								        	<a href="c/home/${map.id }.html"><img class="" src='upload/head/${map.head_img }?s=70' onerror='this.src="upload/head/default.jpg?s=70"' height=70 width=70/></a>
								        </p>
							        </div>
							        <div class="info">
								        <p class="name">
								        	<a href="c/home/${map.id }.html">${map.name }</a>
								        </p>
								        <p class="prof"><span>${map.profession }<c:if test="${map.profession==null or map.profession=='' }">游民</c:if></span>|<span>${map.answers_num+map.article_num }答案</span></p>
								        <p class="prof">
								        	<span>${map.follow_num+0 }关注</span>|
								        	<span>${map.fans_num+0 }粉丝</span>
								        </p>
							        </div>
						        
						        </div>
						    </li>
	               		</c:forEach>
	               		</ol>
                		</div>
                	</div>
					<div class="pagination pagination-centered">
					<ul>
						<c:if test="${fans.hasPreviousPage == true}">
							<li><a href="c/fans/${user.id }.html?page=${fans.currentPage-1 }">上一页</a></li>
						</c:if>
						<c:forEach var="x" begin="${fans.startPage }" end="${fans.endPage }" step="1"> 
							<li <c:if test="${x==fans.currentPage }">class="disabled"</c:if>><a href="c/fans/${user.id }.html?page=${x }">${x }</a></li>
						</c:forEach>
						<c:if test="${fans.hasNextPage ==true }">
							<li><a href="c/fans/${user.id }.html?page=${fans.currentPage+1 }">下一页</a></li>
						</c:if>
						
					</ul>
				</div>
                </div>
			</div>
		</div>
	</div>
</div>
<input type="hidden" value="<%=basePath%>" id="baseUrl"/>
<jsp:include page="include/foot.jsp"></jsp:include>
</body>
</html>